package com.demo.app.module.user;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/user")
public class RoleControl {
	@RequestMapping("/userlist")
	public String userlist(Model model) {
		
		List<RoleInfo> list = new ArrayList<RoleInfo>();
		RoleInfo role1 = new RoleInfo();
		role1.setId("1");
		role1.setName("系统管理员");
		role1.setDesc("拥有最高权力");
		
		RoleInfo role2 = new RoleInfo();
		role2.setId("2");
		role2.setName("系统管理员");
		role2.setDesc("拥有最高权力");
		
		RoleInfo role3 = new RoleInfo();
		role3.setId("3");
		role3.setName("系统管理员");
		role3.setDesc("拥有最高权力");
		
		list.add(role1);
		list.add(role2);
		list.add(role3);
		
		model.addAttribute("roles",list);
		
		return "/user/admin-role";
	}
	
	@RequestMapping("/adduser")
	public String adduser(Model model) {
		
		return "/user/admin-role-add";
	}
	
	

}
